package com.venusj.springcloud.controller;

import com.venusj.springcloud.service.PaymentHystrixService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created By Administrator
 * User: VenusZ
 * Date: on 2020/3/24 21:24
 * Desc:
 */
@RestController
public class OrderHystrixController {

    @Autowired
    private PaymentHystrixService paymentHystrixService;

    @GetMapping(value = "/payment/hystrix/ok/{id}")
    public String paymentInfo_OK(@PathVariable("id") Integer id)
    {
        return paymentHystrixService.paymentInfo_OK(id);
    }

    @GetMapping(value = "/payment/hystrix/error/{id}")
    public String paymentInfo_ERROR(@PathVariable("id") Integer id)
    {
        return paymentHystrixService.paymentInfo_ERROR(id);
    }
}
